package com.usian.apis.wemedia;

import com.usian.model.admin.dtos.NewsAuthDto;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.dtos.WmNewsDto;
import com.usian.model.media.dtos.WmNewsPageReqDto;
import com.usian.model.media.pojos.WmNews;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface WmNewsControllerApi {
    //查询
    ResponseResult findPage(WmNewsPageReqDto dto);
    //发布新闻
    ResponseResult submitNews(WmNewsDto dto);
    //根据id查询新闻
    ResponseResult findByIdNews(Integer id);

    @GetMapping("/getone/{id}")
    WmNews findById(@PathVariable Integer id);

    @PostMapping("/updateWmnews")
    ResponseResult updateWmNews(@RequestBody WmNews wmNews);

    @GetMapping("/findRelease")
    List<Integer> findRelease();

    ResponseResult findList(NewsAuthDto dto);



}
